<%@ include file="/common/taglibs.jsp"%> 
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="<c:url value="/css/shopadmin.css"/>" type="text/css" />
		<link rel="stylesheet" href="<c:url value='/scripts/themes/base/jquery.ui.all.css'/>" type="text/css" />
	</head>
	<body>
		<div class="head_content" id="headBar" style="">
			<div id="" class="finder-action">
				<div class="finder-action-inner clearfix">

					<button class="btn btn-large" onclick="location.href='<c:url value="auto_brand_add.html" />' " type="button">
						<span><span><i class="finder-icon"><img style="width: 24px; height: 24px; background-position: 0pt -316px;" class="imgbundle icon"
										src="<c:url value="/images/transparent.gif"/>" /> </i>添加</span> </span>
					</button>
					<button class="btn" onclick="location.reload()" type="button">
						<span><span><i class="finder-icon"><img style="width: 22px; height: 24px; background-position: 0pt -644px;" class="imgbundle icon"
										src="<c:url value="/images/transparent.gif"/>" /> </i> 刷新 </span> </span>
					</button> 
					<button class="btn" type="button" onclick="batchDelete()">
						<span><span><i class="finder-icon"><img style="width: 17px; height: 24px; background-position: 0pt -757px;" class="imgbundle icon"
										src="<c:url value="/images/transparent.gif"/>" /> </i> 删除 </span> </span>
					</button>
				</div>
			</div>

			<div class="finder-header">
				<table width="100%" cellspacing="0" cellpadding="0">
					<!----cols---->
					<col class="span-select" style="width: 24px;" />
					<col style="width: 48px;" />
					<col style="width: 150px;" />
					<col style="width: 180px;" />
					<col style="width: 350px;" />
					<col style="width: 150px;" />
					<col />
					<!----cols---->
					<thead>
						<tr>
							<td>
								<input type="checkbox" id="check_brand_ids" name="brand_ids" class="sellist" />
							</td>
							<td style="width: 48px;">
								&nbsp;编辑
							</td>
							<td>
								<div key="brand_id" class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label">ID</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"> 名称 </span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"> 网址 </span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
 
							<td>
								&nbsp;
							</td>
						</tr>
					</thead>
				</table>
			</div>

		</div>
		<div class="main_content" id="main">
			<div class="finder-list finder-list-normal">
				<form method="post" action="<c:url value="auto_brand_batchDelete.do"/> " id="brandListForm">
					<table width="100%" cellspacing="0" cellpadding="0" id="tbl_brand">
						<!----cols---->
						<col class="span-select" style="width: 24px;" />
						<col style="width: 48px;" />
						<col style="width: 150px;" />
						<col style="width: 180px;" />
						<col style="width: 350px;" />
						<col style="width: 150px;" />
						<col />
						<!----cols---->
						<tbody>

							<c:forEach var="brand" items="${autoBrands}" varStatus="brandList">
								<tr class="row">
									<td>
										<input onclick="changeColor(this)" type="checkbox" value="${brand.brandId }" name="autoBrands[${brandList.index }].brandId" class="sel" />
									</td>
									<td class="finder-list-command">

										<a href="<c:url value="auto_brand_edit.do?brandId=${brand.brandId }" />"><img style="width: 16px; height: 16px; background-position: 0pt -1811px;" class="imgbundle"
												src="<c:url value="/images/transparent.gif" />" /> </a>
									</td>
									<td>
										<div class="cell">
											<a href="<c:url value="auto_brand_edit.do?brandId=${brand.brandId }" /> "> ${brand.brandId }</a>
										</div>
									</td>
									<td class="editable">
										<div class="cell">
											${brand.brandName }
										</div>
									</td>
									<td class="editable">
										<div class="cell">
											${brand.brandUrl }
										</div>
									</td>
	 
									<td>
										&nbsp;
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</form>
				<div class="" style="overflow: hidden;" ></div>
			</div>

		</div>
		<div class="foot_content" id="footBar" style="">
			<div class="finder-footer">
				<div class="finder-page clearfix">
					<div class="span-3">

					</div>
					<div class="span-auto">
						${pagerString }
					</div>
					<div class="span-auto textright"> 
						<fmt:message key="page.total">
							<fmt:param><i>${totalRecord}</i></fmt:param>
						</fmt:message>
					</div>
				</div>
			</div>
			<div class="finder-detail" id="finder-detail-892ee7">
				<div class="finder-detail-content">
				</div>
			</div>
		</div>
		<div id="dialog-form" title=" <fmt:message key="button.search"/>">
			<form id="search_form" method="post" action="<c:url value="gd_brand_search.html" />">
				<fieldset>
					<label for="name">
						<fmt:message key="gd_brand.name" />
					</label>
					<input type="text" value="${goodsBrand.brandName }" name="goodsBrand.brandName" id="brand_name" class="text ui-widget-content ui-corner-all" style="width: 75%" />

				</fieldset>
			</form>
		</div>



		<script type="text/javascript" src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script>


		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.core.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.widget.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.mouse.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.button.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.draggable.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.position.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.resizable.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.ui.dialog.js'/>"></script>
		<script type="text/javascript" src="<c:url value='/scripts/ui/jquery.effects.core.js'/> "></script>

		<%@ include file="/jsp/admin/common/messages.jsp"%>


		<script type="text/javascript">
 
	var selected = 'selected';
	$("#check_brand_ids").click(function() {

		if (this.checked) {
			$('input[type=checkbox]').attr("checked", true);

			$('#tbl_brand >tbody> tr').addClass(selected);
		} else {
			$('input[type=checkbox]').attr("checked", false);
			$('#tbl_brand > tbody > tr').removeClass(selected);
		}
	});

	function changeColor(obj) {
		if ($(obj).attr("checked")) {
			$(obj).parent().parent().addClass(selected);
		} else {
			$(obj).parent().parent().removeClass(selected);
		}
	}

	function batchDelete() {
		if (!confirm('<fmt:message key="gd_brand.delete_confirm"/>')) {
			return;
		}
		$('#brandListForm').submit();
	}
</script>


	</body>


</html>

